﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x020000F7 RID: 247
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class BattleEquipment : IMessage<BattleEquipment>, IMessage, IEquatable<BattleEquipment>, IDeepCloneable<BattleEquipment>, IBufferMessage
	{
		// Token: 0x17000349 RID: 841
		// (get) Token: 0x06000B35 RID: 2869 RVA: 0x000214E9 File Offset: 0x0001F6E9
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<BattleEquipment> Parser
		{
			get
			{
				return BattleEquipment._parser;
			}
		}

		// Token: 0x1700034A RID: 842
		// (get) Token: 0x06000B36 RID: 2870 RVA: 0x000214F0 File Offset: 0x0001F6F0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return BattleEquipmentReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x1700034B RID: 843
		// (get) Token: 0x06000B37 RID: 2871 RVA: 0x00021502 File Offset: 0x0001F702
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return BattleEquipment.Descriptor;
			}
		}

		// Token: 0x06000B38 RID: 2872 RVA: 0x00021509 File Offset: 0x0001F709
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public BattleEquipment()
		{
		}

		// Token: 0x06000B39 RID: 2873 RVA: 0x00021514 File Offset: 0x0001F714
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public BattleEquipment(BattleEquipment other) : this()
		{
			this.id_ = other.id_;
			this.level_ = other.level_;
			this.promotion_ = other.promotion_;
			this.rank_ = other.rank_;
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x06000B3A RID: 2874 RVA: 0x00021568 File Offset: 0x0001F768
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public BattleEquipment Clone()
		{
			return new BattleEquipment(this);
		}

		// Token: 0x1700034C RID: 844
		// (get) Token: 0x06000B3B RID: 2875 RVA: 0x00021570 File Offset: 0x0001F770
		// (set) Token: 0x06000B3C RID: 2876 RVA: 0x00021578 File Offset: 0x0001F778
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Id
		{
			get
			{
				return this.id_;
			}
			set
			{
				this.id_ = value;
			}
		}

		// Token: 0x1700034D RID: 845
		// (get) Token: 0x06000B3D RID: 2877 RVA: 0x00021581 File Offset: 0x0001F781
		// (set) Token: 0x06000B3E RID: 2878 RVA: 0x00021589 File Offset: 0x0001F789
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Level
		{
			get
			{
				return this.level_;
			}
			set
			{
				this.level_ = value;
			}
		}

		// Token: 0x1700034E RID: 846
		// (get) Token: 0x06000B3F RID: 2879 RVA: 0x00021592 File Offset: 0x0001F792
		// (set) Token: 0x06000B40 RID: 2880 RVA: 0x0002159A File Offset: 0x0001F79A
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Promotion
		{
			get
			{
				return this.promotion_;
			}
			set
			{
				this.promotion_ = value;
			}
		}

		// Token: 0x1700034F RID: 847
		// (get) Token: 0x06000B41 RID: 2881 RVA: 0x000215A3 File Offset: 0x0001F7A3
		// (set) Token: 0x06000B42 RID: 2882 RVA: 0x000215AB File Offset: 0x0001F7AB
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Rank
		{
			get
			{
				return this.rank_;
			}
			set
			{
				this.rank_ = value;
			}
		}

		// Token: 0x06000B43 RID: 2883 RVA: 0x000215B4 File Offset: 0x0001F7B4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as BattleEquipment);
		}

		// Token: 0x06000B44 RID: 2884 RVA: 0x000215C4 File Offset: 0x0001F7C4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(BattleEquipment other)
		{
			return other != null && (other == this || (this.Id == other.Id && this.Level == other.Level && this.Promotion == other.Promotion && this.Rank == other.Rank && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x06000B45 RID: 2885 RVA: 0x00021630 File Offset: 0x0001F830
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.Id != 0U)
			{
				num ^= this.Id.GetHashCode();
			}
			if (this.Level != 0U)
			{
				num ^= this.Level.GetHashCode();
			}
			if (this.Promotion != 0U)
			{
				num ^= this.Promotion.GetHashCode();
			}
			if (this.Rank != 0U)
			{
				num ^= this.Rank.GetHashCode();
			}
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x06000B46 RID: 2886 RVA: 0x000216BA File Offset: 0x0001F8BA
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x06000B47 RID: 2887 RVA: 0x000216C2 File Offset: 0x0001F8C2
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x06000B48 RID: 2888 RVA: 0x000216CC File Offset: 0x0001F8CC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.Id != 0U)
			{
				output.WriteRawTag(8);
				output.WriteUInt32(this.Id);
			}
			if (this.Level != 0U)
			{
				output.WriteRawTag(16);
				output.WriteUInt32(this.Level);
			}
			if (this.Promotion != 0U)
			{
				output.WriteRawTag(24);
				output.WriteUInt32(this.Promotion);
			}
			if (this.Rank != 0U)
			{
				output.WriteRawTag(32);
				output.WriteUInt32(this.Rank);
			}
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x06000B49 RID: 2889 RVA: 0x0002175C File Offset: 0x0001F95C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.Id != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Id);
			}
			if (this.Level != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Level);
			}
			if (this.Promotion != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Promotion);
			}
			if (this.Rank != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Rank);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x06000B4A RID: 2890 RVA: 0x000217E4 File Offset: 0x0001F9E4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(BattleEquipment other)
		{
			if (other == null)
			{
				return;
			}
			if (other.Id != 0U)
			{
				this.Id = other.Id;
			}
			if (other.Level != 0U)
			{
				this.Level = other.Level;
			}
			if (other.Promotion != 0U)
			{
				this.Promotion = other.Promotion;
			}
			if (other.Rank != 0U)
			{
				this.Rank = other.Rank;
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x06000B4B RID: 2891 RVA: 0x0002185C File Offset: 0x0001FA5C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x06000B4C RID: 2892 RVA: 0x00021868 File Offset: 0x0001FA68
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num <= 16U)
				{
					if (num == 8U)
					{
						this.Id = input.ReadUInt32();
						continue;
					}
					if (num == 16U)
					{
						this.Level = input.ReadUInt32();
						continue;
					}
				}
				else
				{
					if (num == 24U)
					{
						this.Promotion = input.ReadUInt32();
						continue;
					}
					if (num == 32U)
					{
						this.Rank = input.ReadUInt32();
						continue;
					}
				}
				this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
			}
		}

		// Token: 0x0400049C RID: 1180
		private static readonly MessageParser<BattleEquipment> _parser = new MessageParser<BattleEquipment>(() => new BattleEquipment());

		// Token: 0x0400049D RID: 1181
		private UnknownFieldSet _unknownFields;

		// Token: 0x0400049E RID: 1182
		public const int IdFieldNumber = 1;

		// Token: 0x0400049F RID: 1183
		private uint id_;

		// Token: 0x040004A0 RID: 1184
		public const int LevelFieldNumber = 2;

		// Token: 0x040004A1 RID: 1185
		private uint level_;

		// Token: 0x040004A2 RID: 1186
		public const int PromotionFieldNumber = 3;

		// Token: 0x040004A3 RID: 1187
		private uint promotion_;

		// Token: 0x040004A4 RID: 1188
		public const int RankFieldNumber = 4;

		// Token: 0x040004A5 RID: 1189
		private uint rank_;
	}
}
